home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PRINTER
/
PROHP.ARJ
/
READ.ME
< prev
next >
Wrap
Text File
|
1992-06-23
|
18KB
|
516 lines
Dear Clipper programmer,
Thank you for downloading ProHP demo.
+*******************************************************************+
| PorHP is the most powerfull |
| laser printer library ever created for |
| laserjet printers. |
+*******************************************************************+
This demo contain several demo programs that use ProHP library. You
can not compile them without the library but we included the output of
this program in the files with the same name with the extention .HPC .
One of the unique features of ProHP library is the option to store the
functions results to a string variable which You can (among other
option) save to a file for later use. One exeptional file with this
demo is DOVERLAY.HPC that shows how overlay macro is done and executed
along with page format and box drawing. To see the result of
DOVERLAY.HPC type :
COPY doverlay.hpc+DHMI.PRG /b lpt1
You can replace HMI.PRG with any file name. ( Remember to reset the
printer after printing to disable the overlay effect and page format
sets by DOVERLAY.HPC . )
To print the result of the demo programs run DEMO.BAT after getting
the result from the printer. Follow the program code and see how ProHP
does all this.
This demo shows only "The Tip Of The Iceberg" of ProHP.
Following the list of ProHP functions with short description followed
by a list of the sample programs that comes with the library to
demonstrate the use of ProHP functions.
ProHP tm developed by I.L.A., Inc., Florida.
(c) Copyright 1992 I.L.A., Inc. All rights reserved.
+******************************************************************+
For More Information and to order call 1-800-374-7734
+******************************************************************+
Development and support
I.L.A., Inc.
520 W. Hwy 436 #1180
Altamonte Springs, FL 32714
Tel. (407) 774-7734
Fax. (407) 774-6750
ProHP - Function Summary
-------------------------
HP_aatsay( nTop, nLeft, aCstr [,nInc [,cJust]])
Prints an array of text, left, center or right justify, starting at
any location on the page, using any font.
HP_atsay( [nTop] , [nLeft],cStr[,lRel])
Prints text anywhere on the page. Specify absolute or relative
coordinates. You can specify measurements use by row/col, inches or
centimeter after setting HPsizes().
HP_bar( nHeight, nWidth [,nFill [,nGrayPat]] )
Draw bars at the current cursor position. By changing the size of
nHeight and nWidth you can draw Horizontal bars, vertical bars and
rectangles (up to full page size).HP_bar() Uses gray shades and
patterns
HP_box( nTop, nLeft, nHeight, nWidth [,nLineWidth [,nFill at]]])
Draw box with control on line width, line type and shadow.
HP_center(nTop, nLeft, cStr [,nWidth])
Center a text over a column/point or in width.
HP_callmac(nMid)
Call a previously defined macro.
HP_clrmrg()
Clear the printer horizontal margins.
HP_cols( nCols )
Sets the number of columns per inch.
HP_copies(nCopies)
Use this command before the print job. You can change the number of
copies any time you desire. The last setting of nCopies is in effect
until the next printer reset.
HP_data(nIndex, Value)
HP_data() is used by ProHP for exchange of data between the
functions.
HP_diagtext(nTop,nLeft ,cStr [,nIncTop [,nIncLeft [,lRel] ] ] )
Print text diagonally, in any angle.
HP_endmacro( [nMacroId], [nStat] )
Close a macro definition.
HP_envelope( nEnvType )
Set the printer for envelope printing.
HP_execmacro( nMid )
Execute a macro.
HP_feed( [nFeed] )
Select source of input paper or envelope. Upper/Lower Tray, manual or
envelope feeder.
HP_fillbox( nTop, nLeft, nHeight, nWidth [,nLineWidth [,nFillBox
[,nGrayPat]]] )
This function allows you to draw different types of filled boxes with
control of line width fill type and shadow.
HP_font( cFont [,nAction [,nFontID ] ] )
This function is designed to handle the process of downloading a soft
font to the printer while analyzing its format for later use and
manipulation. ProHP learns the soft font loaded and adjusts its
environment to fit the use of this font.
HP_fontctrl( [nFontID] , nCtrl )
This function helps you control the fonts downloaded to the printer.
If your printer memory has low space and you need to optimize the use
of fonts, this function helps you to remove specific fonts to allow
space for new ones.
HP_hline( nTop, nLeft, nLength [,nLineWidth [,nFill [,nGrayPat]]] )
Draw horizontal line.
HP_hmi( nHmi )
Fixed spacing fonts are affected by HMI change. When proportional
fonts are used then only the space character is affected. The default
HMI is set to the pitch value in the font header.
HP_init()
HP_init() resets HP_data() array to its default.
HP_lmset( nLm )
Set the left margin
HP_lmiset( nLmi )
Set the left margin in inches.
HP_lmcmset( nLmCm )
Set the left margin in centimeters.
HP_lpi( nLpi )
Set number of Lines Per Inch. This function sets the internal VMI
setting.
HP_macrocmd( nMacroCmd , nMacroId )
This macro control function lets you define, invoke and delete
macros.
HP_mkshadow( nTop,nLeft,nHeight,nWidth [,nShwdth [,nShfill
[,nShGrayPat [,nShtype]]]])
Draws a shadow around an imaginary box, ignoring the status of
HPshadow().
HP_moverlay( lSw , nMacroId )
Enable or Disable automatic overlay action to a macro.
HP_orient( nOrient )
Sets the print direction with respect to the physical page. You can
use this command only once per page. This command sets the defaults
of page length, text length, margins, VMI, HMI.
HP_pagesize( nPageSize )
Select the page size used for printing. (Letter, legal, executive, A4)
HP_pitch( nPitch, nStyle, cSymbol )
This function helps you manipulate the Courier font in the printer,
selecting the pitch, style and symbol set.
HP_prdirect( nDir )
Sets the direction of printing. (works with HP III, PCL 5) this
command will not print the page out like when changing orientation.
HP_rbox( nHeight, nWidth [,nLineWidth [,nFill [,nGrayPat]]])
Draw a box at the current cursor position.
HP_rcpos( nTop ,nLeft ,lRel )
Set row and column coordinates regardless of HPsizes() status.
HP_rcsay( nRow ,nCol, cStr ,lRel )
This function allows you print at any Row/Column coordinates on the
page ignoring the state of HPsizes().
HP_reset()
Send a reset command to the printer.
HP_rjust()
Right justify a text.
HP_rline( nHeight, nWidth [,nFill [,nGrayPat]] )
Draw lines at the current cursor position. By changing the size of
nHeight and nWidth you can draw Horizontal lines, vertical lines and
rectangles (up to full page size).
HP_rmset( nRm )
Set the right margin.
HP_rmiset( nRmi )
Set the right margin in inches.
HP_rmcmset( nRmCm )
Set the right margin in centimeters.
HP_savecsr(),HP_restcsr()
Push/Pop the current cursor position to/from stack.
HP_scalef( nPoint[,nStyle[,nWgt[,cSymbol[,nTypeFace]]]])
Use scalable fonts.
HP_send( lSend )
HP_send() causes ProHP to switch from sending printer code to the
output device or returning them as HPC (string variable).
HP_setpos( [ nTop ], [ nLeft ], [ lRel ] )
Control the cursor position, absolute and relative positioning.
HP_stmacro( nMacroId )
Call this function as the first step in creating a macro.
HP_sub( cStr )
Prints text in subscript mode.
HP_super( cStr )
Prints text in superscript.
HP_symbol( cSymbol )
Set a symbol set as the default set.
HP_textleng( nTextLength )
This command works with top margin setup and lines per inch and must
not followed by them. To determine the maximum text length for page,
use this calculation.
HP_tmset( nTopMargin )
This command designates the number of lines between the top of the
page to the top of the text area.
HP_tmiset( nTMi )
Set top margin in inches.
HP_tmcmset( nTMi )
Set top margin in centimeters.
HP_ulset( lUnderline )
Set underline mode ON or OFF.
HPulstr( cStr )
Make underlined text.
HP_usefont( nFontId )
Select the font previously downloaded to the printer with nFontID.
HP_vline( nTop, nLeft, nLength [,nLineWidth [,nFill
Draw vertical line.
HP_vmi( nVmi )
Set Vertical Motion Index to nVmi, This command affect the line feed
and HP_data(D_LPI) is updated to reflect the new LPI.
HP_vprint( nTop, nLeft, cStr , nInc)
This function takes cStr and prints it vertically starting at
nTop,nLeft stepping down with nInc.
HP_wrap( lWrap )
When end of line wrap is enabled, any text beyond the right margin
will be printed on the next line. If disabled, the text after the
right margin is clipped.
HPbold(nStr)
Make a boldface string. This function will work with any font.
HPccm2i( nCm )
Convert cm to inch. If HPsizes() is set to inches then nCm converted
to inches.
HPci2cm( nInch )
Convert inch size to centimeter if current sizes used is by
centimeters.
HPcm2col( nCm )
Convert CM to columns.
HPcm2row( nCm )
Convert CM to rows.
HPcol2cm( nCol )
Convert column coordinate to centimeters.
HPcol2i( nCol )
Get the size of nColumns in inches. This function can also give you
the length of any fixed space font if HP_cols(font pitch) is set.
HPdownload(cFontName [,cLpt [,nFontID [,nSetFont]]])
HPdownload used for downloading any file in binary mode to the
printer. You can send previously built forms and letters or any
printable file, fast. In that case use HPdownload( cFname , cLpt )
where cFname is the file you want to send to the printer and cLpt the
output device.
HPdrawmonth( dDate, nTop, nLeft, nHeight, nWidth )
Use this function to draw monthly calendar for any date and in any
size at any location on the page. The array returned by the function
can be used to draw or print additional information on any specific
day of the month.
HPfonthead( cFontName )
This fonts helps you to explore the structure of any soft font.
HPgraytext( nStr [,nFill [,nGrayPat [,nHeight]] )
Print text on gray or pattern background.
HPhfont()
HPhfont is used to get the cell height of the font. This function get
updates each call to HP_pitch() and call to HP_font(). Use this
function when you design fine graphics and need to know the exact
height of the font. You can get this information by reading the font
description data array with HPfonthead().
HPi2col( nInch )
Get the number of columns in nInch.
HPreplicate( cStr , nWidth )
Used to repeatedly print one or more characters in nWidth.
HPsavecsr(), HPrestcsr()
Use this command when you want to save and restore the cursor
location. This function returns HPC regardless of HP_send() status.
HProw2cm( nRow )
Convert rows to centimeters.
HProw2i( nRow )
Convert rows to inches. Useful when mixing row/col coordinates and
inches.
HPscale( nScale )
This Unique function lets you specify the scale factor for the height
and width size in the next drawings. This helps you match your output
to a different area size without having to recalculate the new sizes.
HPsetshadow( nShWdth, nShFill ,nShGrayPat ,nShType )
Alternative way to set new defaults for box shadow.
HPshadow( lShadow )
ProHP will do all the calculations to draw a shadow with the width,
filltype ,gray/pattern and position. All you need is to set
HPshadow(.t.).
HPsizes( nMeasure )
Set unit of measure for ProHP functions. Not all functions accept
measures in cm or row/col.
HPstsize( cStr )
This function positions the text anywhere you like. It is easy to do
justification (center or right) when you know the text length,
especially with proportional fonts. This function works with all
fixed space fonts (even if you change HMI) and with all soft font
downloaded using HP_font(). Scalable fonts supported with this
function are CGTIMES and UNIVERSE (resident in HP III)
HPwchars( cFont )
ProHP reads the font file with all the necessary data for the
different functions needed to handle it. ProHP reads the chars width
during the process of downloading the font to the printer when using
HP_font().
Set2Print( cDevName )
Set the output device to cDevName. Use this function before printing.
Set2Screen()
Set the output device to the screen, closing the device opened
previously with set2print(cDevName)
zAddMonth(dDate, nMonths)
Add/ deduct month(s) from a date.
zMdy2Date(nMonth, nDay, nYear)
make a date from 3 integer vars (nMonth,nDay,nYear).
ProHP - Sample Programs
-------------------------
ATSAY.PRG Shows you the use of HP_atsay() by printing a report
inside gray shaded box with drop down shadow.
BAR.PRG Another way to look and use relative movement functions.
CALENDAR.PRG You are going to love this one. Compile and run it NOW!.
COLS.PRG HP_cols() is very useful and powerful function. This
program demonstrates one use by drawing a ruler of 15 cm
marking each millimeter.
DIAGTEXT.PRG Demonstrates how to print text diagonally.
ENVELOPE.PRG Probably the easiest way to print envelopes. This program
shows you how to print envelopes by reading addresses
from a file.
FONTS.PRG This program shows you how to manipulate fonts with ProHP
functions and select a font using an alias. You may
modify this program and adopt the technic shown to set
complicated printer environment setting.
FILLBOX.PRG 24 different boxes are filled with gray shade patterns
and shadow printed using this program.
FONTHEAD.PRG Read any given soft font file and display the font
descriptor data.
GRAPH.PRG Demonstrate how to easily generate bar graphs. Two
methods are demonstrated here, and you can adopt it to
your needs immediately.
GRAYTEXT.PRG Demonstrates the use of HPgraytext() by printing text
with different backgrounds (gray shade or pattern). This
program also show the use of HP_font() to load soft font
and use them.
HMI.PRG Demonstrate the use of HP_hmi() by showing a way to force
a 10 pitch font to be printed as 12 pitch and 16.66 pitch
forced to 20 pitch. also expanding any pitch used with
any fixed spacing font to any other pitch. an Inch ruler
is drawn at the background of the text to show the
behavior of the text when using HP_hmi().
HPSCALE.PRG Unique to ProHP (as many other ideas) is the ability to
change your drawing size with one call to HPscale().
HPSHADOW.PRG Short program to show the use of shadow boxes.
LPI.PRG ProHP allows you to specify any Lines Per Inch count.
LPI.PRG shows you 4 ways to control and use HP_lpi().
Find how many lines can be used in a box or any Height,
Set the number of lines in any Height to fit x number of
lines in that height. The use of HProw2i() and HPcol2i()
is demonstrated.
MARGINS.PRG This program demonstrates the use of margin setting by
showing you how to set margins (by sizes columns, inch or
centimeter) accurately to a fraction of a tenth of a
millimeter.
ORIENT.PRG HP_orient is Simple function to change the page
orientation. This program shows you how to store ProHP
commands in an array of a string variable for conditional
operation.
PAGESIZE.PRG Control page size. change page size from letter to legal
and print text on the entire page. print 130 lines of
text on a legal size paper.
PRINV.PRG This excellent program demonstrates the ease of building
forms by creating an invoice form and filling it with the
invoice data. Also you will see how to resize the form by
ONE (1) command, HPscale(). Also you can see how ProHP
easily save the invoice format to file and retrieve it
later fast and exact. Stay on this program there are many
good ideas to learn here.
PUBLISH.PRG Many functions are used in this program to draw a page of
text in columns using different font sizes, insert
monthly calendar and graph in the text column. There is a
lot to learn from this program. If you understand how
this program does all this then there is no limit to what
you can do with ProHP and your printer.
RELATIVE.PRG Beautiful program to demonstrate ProHP function that use
relative movement and at cursor location line draw.
Compile and run it to get impressed.
ROW2CM.PRG Short program on HProw2cm() and other conversion
functions.
ROW2I.PRG Convert row to inch. way of using.
SCALEF.PRG Using scalable fonts is easy with ProHP and this program
shows you how to select a scalable font and use it.
SEND.PRG HP_send() will make your laser printer programming very
easy. This short program will show you how to use it.
SHADOW.PRG This program will show you many different shadow boxes
using grays and pattern shadow.
SHADOWT.PRG Draw 9 different boxes showing all shadow types. It also
shows how to center an array of text inside a box using
code block.
STRSIZE.PRG Get string size and center it in any width and over a
column.
SUB_SUP.PRG Text printed in subscript and superscript mode is used in
this program.
SYMBOL.PRG Small program to show the use of HP_symbol()
TEXTLENG.PRG One way of using HP_textleng(). the use of macros is also
shown here.
UNDERLN.PRG You will find in this program a very Unique way to
underline text.
VPRINT.PRG Print a text vertically , move relative and center text.
E